package com.ds.infrastructure.audit.road.service;

import com.ds.infrastructure.audit.road.api.vo.RoadVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.Random;

/**
 * 作用：
 *
 * @author WeiShaoying
 */
@Service
@Slf4j
public class RoadService {

    private final Random random = new Random();

    @Value("${server.port}")
    private String port;

    public RoadVO queryRoadState() {
        return new RoadVO("G-" + port, "state:" + random.nextInt(100));
    }

}
